home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today - The Disc! 5
/
CD-ROM Today - The Disc (Issue 5)(November 1994).ISO
/
mac
/
Mac shareware
/
Education
/
RLaB
/
help
/
members
< prev
next >
Wrap
Text File
|
1994-09-21
|
670b
|
23 lines
members:
Syntax: members ( L )
Description:
The members function takes a single list as an argument (L),
and returns a string-vector containing the list's member
names.
For example: `x = members ($$)' will create a row-vector
(type: string) and assign it to `x'. The row-vector will
contain the names of all the elements of the
global-symbol-table.
The members function is probably most useful when used in
conjunction with for-loops. The result of members() can be
used as the loop index, allowing users to operate on the
elements of a list:
ll = << a = rand(3,3); b = rand(3,3); c = rand(3,3) >>;
for (i in members (ll)) { ll.[i] = diag(ll.[i]); }